package cn.bellychang.ood.litejunit.v3.framework.runner;

import cn.bellychang.ood.litejunit.v3.framework.notification.RunNotifier;

/**
 * @author ChangLiang
 * @date 2020/5/27
 */
public abstract class Runner {

    /**
     * @return a <code>Description</code> showing the tests to be run by the receiver
     */
    public abstract Description getDescription();

    /**
     * Run the tests for this runner.
     * @param notifier will be notified of events while tests are being run--tests being started, finishing, and failing
     */
    public abstract void run(RunNotifier notifier);

    /**
     * @return the number of tests to be run by the receiver
     */
    public int testCount() {
        return getDescription().testCount();
    }
}
